Extensible languages for flexible and principled domain abstraction
نویسنده
چکیده
Most programming languages are designed for general-purpose software development in a one-size-fits-all fashion: They provide the same set of language features and constructs for all possible applications programmers ever may want to develop. As with shoes, the one-size-fits-all solution grants a good fit to few applications only. The trend toward domain-specific languages, model-driven development, and languageoriented programming counters general-purpose languages by promoting the use of domain abstractions that facilitate domain-specific language features and constructs tailored to certain application domains. In particular, domain abstraction avoids the need for encoding domain concepts with general-purpose language features and thus allows programmers to program at the same abstraction level as they think. Unfortunately, current approaches to domain abstraction cannot deliver on the promises of domain abstraction. On the one hand, approaches that target internal domain-specific languages lack flexibility regarding the syntax, static checking, and tool support of domain abstractions, which limits the level of actually achieved domain abstraction. On the other hand, approaches that target external domain-specific languages lack important principles, such as modular reasoning and composition of domain abstractions, which inhibits the applicability of these approaches in the development of larger software systems. In this thesis, we pursue a novel approach that unifies the advantages of internal and external domain-specific languages to support flexible and principled domain abstraction. We propose library-based extensible programming languages as a basis for domain abstraction. In an extensible language, domain abstraction can be realized by extending the language with domain-specific syntax, static analysis, and tool support. This enables domain abstractions as flexible as external domain-specific languages. To ensure the compliance with important software-development principles, we organize language extensions as libraries and use simple import statements to activate extensions. This facilitates modular reasoning (by inspecting import statements), supports the composition of domain abstractions (by importing multiple extensions), and allows uniform self-application of language extensions in the development of further extensions (by importing extensions in an extension definition). A library-based organization of extensions enables domain abstractions as principled as internal domain-specific languages. We designed and implemented SugarJ, a library-based extensible programming language on top of Java. SugarJ libraries can declare and export extensions of SugarJ’s syntax, static analysis, and editor support. Thereby, a syntactic extension consists of an extended syntax and a desugaring transformation from the extended syntax into SugarJ base syntax, an analysis extension matches on part of the current file’s abstract syntax tree
منابع مشابه
Testing Extensible Language Debuggers
Extensible languages allow incremental extensions of a host language with domain specific abstractions. Debuggers for such languages must be extensible as well to support debugging of different language extensions at their corresponding abstraction level. As such languages evolve over time, it is essential to constantly verify their debugging behavior. For this purpose, a General Purpose Langua...
متن کاملMulti-Level Debugging for Extensible Languages
Multi-level debugging of extensible languages requires lifting program state to the extension level while translating stepping commands to the base-level. Implementing such bi-directional mappings is feasible for languages with a low abstraction level (e. g., C). However, language workbenches support language stacking with a bottom-up approach from lowto high-level (e. g., domain-specific) lang...
متن کاملVideo Abstraction in H.264/AVC Compressed Domain
Video abstraction allows searching, browsing and evaluating videos only by accessing the useful contents. Most of the studies are using pixel domain, which requires the decoding process and needs more time and process consuming than compressed domain video abstraction. In this paper, we present a new video abstraction method in H.264/AVC compressed domain, AVAIF. The method is based on the norm...
متن کامل3D Finite element modeling for Dynamic Behavior Evaluation of Marin Risers Due to VIV and Internal Flow
The complete 3D nonlinear dynamic problem of extensible, flexible risers conveying fluid is considered. For describing the dynamics of the system, the Newtonian derivation procedure is followed. The velocity field inside the pipe formulated using hydrostatic and Bernoulli equations. The hydrodynamic effects of external fluids are taken into consideration through the nonlinear drag forces in var...
متن کاملPsiLight: a Lightweight Programming Language to Explore Multiple Program Execution and Data-binding in a Web-Client DSL Evaluation Engine
Domain-Specific Languages (DSLs) allow building software applications by simplifying the labour of both software engineers and domain experts thanks to the abstraction provided by a high-level code. Introducing a DSL in the software development process requires the use of technologies and frameworks in the design and implementation activities. If we are restricted to web-client applications, th...
متن کامل